/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const orderRouter = {
  path: '/order',
  component: Layout,
  name: '销售',
  meta: {
    title: '销售',
    subtitle:'销售',
    icon: 'sale'
  },
  children: [
    // 模拟三级路由
    {
      path: '',
      component: Layout,
      name: '销售',
      meta: { title: '销售', subtitle: '日常', icon: 'menu-sales'},
      childrens: [
        {
          path: '/order/list',
          meta: { title: '销售单',subtitle:'销售', icon: 'menu-sales', permissions: ['order.query'],color:'true'}
        },
        {
          path: '/askfor/list',
          meta: { title: '退货单',subtitle:'申请', icon: 'menu_askfor', permissions: ['askfor.query'] }
        },
        {
          path: '/groupOrder/index',
          meta: { title: '团购单', subtitle:'团购',icon: 'menu_material', permissions: ['shipping-list'],color:'true'},
        },
      ]
    },
    {
      path: '',
      component: Layout,
      name: '仓库',
      meta: { title: '仓库', subtitle: '业务', icon: 'menu_shipping'},
      childrens: [
        {
          path: '/saleout/list',
          meta: { title: '销售出库', subtitle:'出库',icon: 'menu_material', permissions: ['saleout.query'],color:'true' }
        },
        {
          path: '/salein/list',
          meta: { title: '退货入库', subtitle:'退货',icon: 'menu_material', permissions: ['salein.query'] }
        },
      ]
    },
    {
      path: '',
      component: Layout,
      name: '配送',
      meta: { title: '配送', subtitle: '业务', icon: 'menu_shipping'},
      childrens: [
        {
          path: '/picking/list',
          meta: { title: '同城装车单', subtitle:'装车',icon: 'menu_material', permissions: ['picking.query'] }
        },
        {
          path: '/shipping/tcList',
          meta: { title: '同城送货单', subtitle:'送货',icon: 'menu_material', permissions: ['shipping-list'],color:'true'},
        },
        {
          path: '/shipping/kdList',
          meta: { title: '快递发货单', subtitle:'发货',icon: 'menu_material', permissions: ['shipping-list'],color:'true'},
        },
      ]
    },
    {
      path: '',
      component: Layout,
      name: '查询',
      meta: { title: '查询', subtitle: '查询', icon: 'menu-sales'},
      childrens: [
        {
          path: '/orderReport/list',
          meta: { title: '销售汇总表',subtitle:'销售', icon: 'menu_report',permissions:['orderReport.query']}
        },
        {
          path: '/orderReport/detailslist',
          meta: { title: '销售明细表',subtitle:'销售', icon: 'menu_report',permissions:['orderDetailReport.query']}
        },
        {
          path: '/deliverymanReport/index',
          meta: { title: '送货汇总表',subtitle:'营业', icon: 'menu_report',permissions:['deliveryReport.query']}
        },
        {
          path: '/deliverymanReport/indexdatailed',
          meta: { title: '送货明细表',subtitle:'营业', icon: 'menu_report',permissions:['deliveryReport.query']}
        },
        {
          path: '/supplyCountReport/list',
          meta: { title: '发货汇总表',subtitle:'查询', icon: 'menu_shipping', permissions: ['supplyCountReport.query'] }
        },
        {
          path: '/supplyCountReport/detailslist',
          meta: { title: '发货明细表',subtitle:'查询', icon: 'menu_shipping', permissions: ['supplyCountReport.query'] }
        },
      ]
    },

    // 注册路由

    {
      path: '/company/list',
      component: () => import('@/views/company/list'),
      name: 'company-list',
      meta: {title: '福利卡充值',subtitle:'企业', icon: 'menu_member', permissions: ['companyList.query']},
      hidden: true
    },
    {
      path: '/order/list',
      component: () => import('@/views/order/list'),
      name: 'order-list',
      meta: { title: '销售单',subtitle:'销售', icon: 'menu-sales', permissions: ['order.query'] },
      hidden: true
    },
    {
      path: '/order/add',
      component: () => import('@/views/order/add'),
      name: 'order-add',
      meta: { title: '新增销售单', icon: 'menu-sales' },
      hidden: true
    },
    {
      path: '/order/edit',
      component: () => import('@/views/order/edit'),
      name: 'order-edit',
      meta: { title: '修改销售单', icon: 'menu-sales' },
      hidden: true
    },
    {
      path: '/order/view',
      component: () => import('@/views/order/view'),
      name: 'order-view',
      meta: { title: '销售单详情', icon: 'menu-sales' },
      hidden: true
    },
    {
      path: '/order/components/amap',
      component: () => import('@/views/order/components/amap'),
      name: 'order-amap',
      meta: { title: '订单分布图', icon: 'menu-sales' },
      hidden: true
    },
    {
      path: '/askfor/list',
      component: () => import('@/views/askfor/list'),
      name: 'askfor-list',
      meta: { title: '退货单',subtitle:'申请', icon: 'menu_askfor', permissions: ['askfor.query'] },
      hidden: true
    },
    {
      path: '/askfor/view',
      component: () => import('@/views/askfor/view'),
      name: 'askfor-view',
      meta: { title: '退货单详情', icon: 'menu_askfor', permissions: ['askfor-list'] },
      hidden: true
    },
    {
      path: '/askfor/add',
      component: () => import('@/views/askfor/add'),
      name: 'askfor-add',
      meta: { title: '新增退货单', icon: 'menu-sales' },
      hidden: true
    },
    {
      path: '/orderReport/list',
      component: () => import('@/views/orderReport/list'),
      name: 'orderReport-list',
      meta: { title: '销售汇总表',subtitle:'销售', icon: 'menu_report'},
      hidden: true
    },

    {
      path: '/orderReport/detailslist',
      component: () => import('@/views/orderReport/detailslist'),
      name: 'orderReport-detailslist',
      meta: { title: '销售明细表',subtitle:'详情', icon: 'menu_report',},
      hidden: true
    },
    {
      path: '/picking/list',
      component: () => import('@/views/picking/list'),
      name: 'picking-list',
      meta: { title: '同城装车单',subtitle:'装车单', icon: 'menu_pick',},
      hidden: true
    },
    {
      path: '/picking/add',
      component: () => import('@/views/picking/add'),
      name: 'picking-add',
      meta: { title: '新增装车单',subtitle:'新增装车单', icon: 'menu_pick',},
      hidden: true
    },
    // {
    //   path: '/picking/edit',
    //   component: () => import('@/views/picking/edit'),
    //   name: 'picking-edit',
    //   meta: { title: '编辑装车单',subtitle:'编辑装车单', icon: 'menu_pick',},
    //   hidden: true
    // },
    {
      path: '/picking/view',
      component: () => import('@/views/picking/view'),
      name: 'picking-view',
      meta: { title: '装车单详情',subtitle:'装车单详情', icon: 'menu_pick',},
      hidden: true
    },
    {
      path: '/supplyCountReport/list',
      component: () => import('@/views/supplyCountReport/list'),
      name: 'supplyCountReport-list',
      meta: { title: '发货汇总表',subtitle:'发货', icon: 'menu_report',permissions:['supplyCountReport.query']},
      hidden: true
    },
    {
      path: '/supplyCountReport/detailslist',
      component: () => import('@/views/supplyCountReport/detailslist'),
      name: 'supplyCountReport-detailslist',
      meta: { title: '发货明细表',subtitle:'详情', icon: 'menu_report',},
      hidden: true
    },

    {
      path: '/deliverymanReport/index',
      component: () => import('@/views/deliverymanReport/index'),
      name: 'deliverymanReport-index',
      meta: { title: '送货汇总表', subtitle:'送货统计表',icon: 'menu_payment', permissions: ['deliveryReport.query'] },
      hidden: true
    },
    {
      path: '/deliverymanReport/indexdatailed',
      component: () => import('@/views/deliverymanReport/indexdatailed'),
      name: 'deliverymanReport-indexdatailed',
      meta: { title: '送货明细表', subtitle:'送货明细表',icon: 'menu_payment',},
      hidden: true
    },
    {
      path: '/saleout/list',
      component: () => import('@/views/saleout/list'),
      name: 'saleout-list',
      meta: { title: '销售出库', subtitle:'出库',icon: 'menu_material', permissions: ['saleout.query'] },
      hidden: true
    },
    // {
    //   path: '/saleout/add',
    //   component: () => import('@/views/saleout/add'),
    //   name: 'saleout-add',
    //   meta: { title: '新增销售出库单', icon: 'menu_material' },
    //   hidden: true
    // },
    // {
    //   path: '/saleout/edit',
    //   component: () => import('@/views/saleout/edit'),
    //   name: 'saleout-edit',
    //   meta: { title: '修改销售出库单', icon: 'menu_material' },
    //   hidden: true
    // },
    {
      path: '/saleout/view',
      component: () => import('@/views/saleout/view'),
      name: 'saleout-view',
      meta: { title: '销售出库单详情', icon: 'menu_material' },
      hidden: true
    },
    {
      path: '/salein/list',
      component: () => import('@/views/salein/list'),
      name: 'salein-list',
      meta: { title: '销售退货单', subtitle:'退货',icon: 'menu_material', permissions: ['salein.query'] },
      hidden: true
    },
    // {
    //   path: '/salein/add',
    //   component: () => import('@/views/salein/add'),
    //   name: 'salein-add',
    //   meta: { title: '新增退货单', icon: 'menu_material' },
    //   hidden: true
    // },
    // {
    //   path: '/salein/edit',
    //   component: () => import('@/views/salein/edit'),
    //   name: 'salein-edit',
    //   meta: { title: '修改退货单', icon: 'menu_material' },
    //   hidden: true
    // },
    {
      path: '/salein/view',
      component: () => import('@/views/salein/view'),
      name: 'salein-view',
      noCache: true,
      meta: { title: '销售退货单详情', icon: 'menu_material' },
      hidden: true
    },
    {
      path: '/shipping/tcList',
      component: () => import('@/views/shipping/tcList'),
      name: 'shipping-list',
      meta: { title: '同城送货单', subtitle:'送货',icon: 'menu_material', permissions: ['shipping-list']},
      hidden: true
    },
    {
      path: '/shipping/kdList',
      component: () => import('@/views/shipping/kdList'),
      name: 'shipping-kd-list',
      meta: { title: '快递发货单', subtitle:'送货',icon: 'menu_material', permissions: ['shipping-list']},
      hidden: true
    },
    {
      path: '/shipping/view',
      component: () => import('@/views/shipping/view'),
      name: 'shipping-view',
      meta: { title: '送货单详情', icon: 'menu_material' },
      hidden: true
    },
    {
      path: '/shipping/batchShipping',
      component: () => import('../../views/shipping/batchShipping'),
      name: 'shipping-batchShipping',
      meta: { title: '批量发货', icon: 'menu_material' },
      hidden: true
    },
    {
      path: '/shipping/import',
      component: () => import('../../views/shipping/import'),
      name: 'shipping-import',
      meta: { title: '月卡套餐导入', icon: 'menu_material' },
      hidden: true
    },
    {
      path: '/returns/list',
      component: () => import('@/views/returns/list'),
      name: 'returns-list',
      meta: { title: '销售退货单', subtitle:'退货',icon: 'menu_material', permissions: ['return.query'] },
      hidden: true
    },
    {
      path: '/returns/view',
      component: () => import('@/views/returns/view'),
      name: 'returns-view',
      meta: { title: '销售退货单详情', icon: 'menu_material' },
      hidden: true
    },
    // {
    //   path: '/union/index',
    //   component: () => import('@/views/union/index'),
    //   name: 'union-index',
    //   meta: { title: '联盟单', subtitle:'联盟',icon: 'menu_material', permissions: ['shipping-list']},
    //   hidden: true
    // },
    // {
    //   path: '/union/view',
    //   component: () => import('@/views/union/view'),
    //   name: 'union-view',
    //   meta: { title: '联盟详情', subtitle:'详情',icon: 'menu_material', permissions: ['shipping-list']},
    //   hidden: true
    // },
    {
      path: '/groupOrder/index',
      component: () => import('@/views/groupOrder'),
      name: 'groupOrder-index',
      meta: { title: '团购订单', subtitle:'团购',icon: 'menu_material', permissions: ['shipping-list']},
      hidden: true
    },
    {
      path: '/groupOrder/view',
      component: () => import('@/views/groupOrder/view'),
      name: 'groupOrder-view',
      meta: { title: '团购订单详情', subtitle:'详情',icon: 'menu_material', permissions: ['shipping-list']},
      hidden: true
    },
    {
      path: '/snaporder/list',
      component: () => import('@/views/snaporder/list'),
      name: 'snaporder-list',
      meta: { title: '抢拍订单', subtitle:'抢拍',icon: 'menu_material',},
      hidden: true
    },
  ]
}
export default orderRouter
